/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package iodegree;

import iodegree.lib.GenRanDist;
import iodegree.lib.database.LegacyDB;
import iodegree.lib.URIHandle;
import iodegree.lib.MyFit;
import iodegree.dataStrucure.QryResult;
import java.awt.Color;
import java.util.ArrayList;

/**
 *
 * @author Libra
 */
public class IoDistanceUI extends javax.swing.JFrame {

    /**
     * Creates new form IoUIMain
     */
    public IoDistanceUI() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DataFileChooser = new javax.swing.JFileChooser();
        gluGABAGroup = new javax.swing.ButtonGroup();
        inOutGroup = new javax.swing.ButtonGroup();
        DIVGroup = new javax.swing.ButtonGroup();
        btnQuery = new javax.swing.JButton();
        lblDoQuery = new javax.swing.JLabel();
        lblQueryOption = new javax.swing.JLabel();
        rdoInput = new javax.swing.JRadioButton();
        rdoOutput = new javax.swing.JRadioButton();
        txt1Deg = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        txt2Deg = new javax.swing.JTextField();
        txt3Deg = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        lblEmail = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        txtTotalConn = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        btnGenRnd = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        txtCycles = new javax.swing.JTextField();
        btnSaveRnd = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        btnCompare = new javax.swing.JButton();
        txtGreater1 = new javax.swing.JTextField();
        txtLess2 = new javax.swing.JTextField();
        txtLess3 = new javax.swing.JTextField();
        txtLess1 = new javax.swing.JTextField();
        txtGreater2 = new javax.swing.JTextField();
        txtGreater3 = new javax.swing.JTextField();
        txtGreater0 = new javax.swing.JTextField();
        txtLess0 = new javax.swing.JTextField();
        txt0Deg = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        txtTotalCell = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        txtAvg1 = new javax.swing.JTextField();
        txtAvg0 = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        txtAvg3 = new javax.swing.JTextField();
        txtAvg2 = new javax.swing.JTextField();
        rdoDiv5 = new javax.swing.JRadioButton();
        rdoDiv6 = new javax.swing.JRadioButton();
        rdoDiv7 = new javax.swing.JRadioButton();
        rdoDiv8 = new javax.swing.JRadioButton();
        rdoDivAll = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("IO Degree Distribution");

        btnQuery.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnQuery.setText("Query");
        btnQuery.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQueryActionPerformed(evt);
            }
        });

        lblDoQuery.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lblDoQuery.setText("3. Perform Query :");

        lblQueryOption.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lblQueryOption.setText("2. IO Option:");

        inOutGroup.add(rdoInput);
        rdoInput.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoInput.setSelected(true);
        rdoInput.setText("Input");
        rdoInput.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoInputActionPerformed(evt);
            }
        });

        inOutGroup.add(rdoOutput);
        rdoOutput.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoOutput.setText("Output");
        rdoOutput.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoOutputActionPerformed(evt);
            }
        });

        txt1Deg.setEditable(false);
        txt1Deg.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txt1Deg.setText("0");
        txt1Deg.setToolTipText("");

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setText("4. Result :");

        txt2Deg.setEditable(false);
        txt2Deg.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txt2Deg.setText("0");

        txt3Deg.setEditable(false);
        txt3Deg.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txt3Deg.setText("0");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel2.setText("<html>1&deg");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel3.setText("<html>2&deg");

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel4.setText("<html>3&deg");

        lblEmail.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lblEmail.setText("zhangxiaoxing@Ion.ac.cn");
        lblEmail.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lblEmailMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lblEmailMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lblEmailMouseExited(evt);
            }
        });

        txtTotalConn.setEditable(false);
        txtTotalConn.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtTotalConn.setText("0");

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel6.setText("Total Connections");

        btnGenRnd.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnGenRnd.setText("Generate");
        btnGenRnd.setEnabled(false);
        btnGenRnd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGenRndActionPerformed(evt);
            }
        });

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel7.setText("5. Random Sim :");

        jButton2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jButton2.setText("Load");
        jButton2.setEnabled(false);

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel8.setText("Cycles");

        txtCycles.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtCycles.setText("10000");

        btnSaveRnd.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnSaveRnd.setText("Save");
        btnSaveRnd.setEnabled(false);

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel5.setText("6. Compare");

        btnCompare.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnCompare.setText("Compare");
        btnCompare.setEnabled(false);
        btnCompare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCompareActionPerformed(evt);
            }
        });

        txtGreater1.setEditable(false);
        txtGreater1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtGreater1.setText("0");

        txtLess2.setEditable(false);
        txtLess2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtLess2.setText("0");

        txtLess3.setEditable(false);
        txtLess3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtLess3.setText("0");

        txtLess1.setEditable(false);
        txtLess1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtLess1.setText("0");

        txtGreater2.setEditable(false);
        txtGreater2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtGreater2.setText("0");

        txtGreater3.setEditable(false);
        txtGreater3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtGreater3.setText("0");
        txtGreater3.setToolTipText("");

        txtGreater0.setEditable(false);
        txtGreater0.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtGreater0.setText("0");

        txtLess0.setEditable(false);
        txtLess0.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtLess0.setText("0");

        txt0Deg.setEditable(false);
        txt0Deg.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txt0Deg.setText("0");

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel9.setText("<html>0&deg");

        txtTotalCell.setEditable(false);
        txtTotalCell.setText("0");

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel10.setText("Total");

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel11.setText("equal or less by chance, p=");

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel12.setText("equal or greater by change, p=");

        jLabel13.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel13.setText("<html>0&deg");

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel14.setText("<html>2&deg");

        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel15.setText("<html>1&deg");

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel16.setText("<html>3&deg");

        txtAvg1.setEditable(false);
        txtAvg1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtAvg1.setText("0");

        txtAvg0.setEditable(false);
        txtAvg0.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtAvg0.setText("0");

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel17.setText("Average by chance");

        txtAvg3.setEditable(false);
        txtAvg3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtAvg3.setText("0");

        txtAvg2.setEditable(false);
        txtAvg2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtAvg2.setText("0");

        DIVGroup.add(rdoDiv5);
        rdoDiv5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoDiv5.setText("DIV5");
        rdoDiv5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoDiv5ActionPerformed(evt);
            }
        });

        DIVGroup.add(rdoDiv6);
        rdoDiv6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoDiv6.setText("DIV6");
        rdoDiv6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoDiv6ActionPerformed(evt);
            }
        });

        DIVGroup.add(rdoDiv7);
        rdoDiv7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoDiv7.setText("DIV7");
        rdoDiv7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoDiv7ActionPerformed(evt);
            }
        });

        DIVGroup.add(rdoDiv8);
        rdoDiv8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoDiv8.setText("DIV8");
        rdoDiv8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoDiv8ActionPerformed(evt);
            }
        });

        DIVGroup.add(rdoDivAll);
        rdoDivAll.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        rdoDivAll.setSelected(true);
        rdoDivAll.setText("ALL");
        rdoDivAll.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rdoDivAllActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jSeparator1)
                .addGap(10, 10, 10))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addGap(18, 18, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addGroup(layout.createSequentialGroup()
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING))
                                                .addGap(18, 18, 18))
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                                .addGap(112, 112, 112)
                                                .addComponent(jLabel10)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(txt0Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(txtAvg0, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(txtLess0, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(txtGreater0, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(18, 18, 18))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(59, 59, 59)))
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txt1Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAvg1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtLess1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtGreater1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(txt2Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtLess2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtAvg2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(txtGreater2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(19, 19, 19)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txt3Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtAvg3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtLess3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtGreater3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblQueryOption)
                                    .addComponent(lblDoQuery))
                                .addGap(36, 36, 36)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(btnQuery)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(rdoDiv5)
                                            .addComponent(rdoInput))
                                        .addGap(18, 18, 18)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(rdoOutput)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(rdoDiv6)
                                                .addGap(18, 18, 18)
                                                .addComponent(rdoDiv7)
                                                .addGap(18, 18, 18)
                                                .addComponent(rdoDiv8)
                                                .addGap(18, 18, 18)
                                                .addComponent(rdoDivAll))))))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(lblEmail))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(162, 162, 162)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(jLabel6)
                                                .addGap(18, 18, 18)
                                                .addComponent(txtTotalConn, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(btnCompare)
                                            .addGroup(layout.createSequentialGroup()
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(btnGenRnd)
                                                    .addComponent(btnSaveRnd))
                                                .addGap(18, 18, 18)
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jButton2)
                                                    .addGroup(layout.createSequentialGroup()
                                                        .addComponent(txtCycles, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(jLabel8))))
                                            .addComponent(txtTotalCell, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(10, 10, 10)
                                        .addComponent(jLabel1)))
                                .addGap(113, 113, 113)
                                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 26, Short.MAX_VALUE)))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(71, 71, 71)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblQueryOption)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(rdoInput)
                                .addGap(18, 18, 18)
                                .addComponent(rdoDiv5)))
                        .addGap(53, 53, 53)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnQuery)
                            .addComponent(lblDoQuery)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(rdoOutput)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(rdoDiv6)
                            .addComponent(rdoDiv7)
                            .addComponent(rdoDiv8)
                            .addComponent(rdoDivAll))))
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txt1Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txt3Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txt2Deg, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txt0Deg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtTotalCell, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtTotalConn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(txtCycles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGenRnd))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(btnSaveRnd)
                                .addComponent(jButton2))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel5)
                                .addComponent(btnCompare))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(txtAvg2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAvg3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17)
                    .addComponent(txtAvg0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAvg1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtLess0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtGreater0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtLess2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtLess3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtLess1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtGreater1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtGreater2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtGreater3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(24, 24, 24)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblEmail)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnQueryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQueryActionPerformed
        performQuery(pathToFile);
        countSlot(pathToFile);
        btnGenRnd.setEnabled(true);

    }//GEN-LAST:event_btnQueryActionPerformed

    private void rdoOutputActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoOutputActionPerformed
        boolInput = false;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoOutputActionPerformed

    private void rdoInputActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInputActionPerformed
        boolInput = true;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoInputActionPerformed

    private void btnGenRndActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenRndActionPerformed
        GenRanDist gen=new GenRanDist();
        genCycle = Integer.parseInt(txtCycles.getText());
        arrRndGen = gen.connRnd(boolInput, div, genCycle);
        btnCompare.setEnabled(true);
    }//GEN-LAST:event_btnGenRndActionPerformed

    private void lblEmailMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblEmailMouseClicked
        URIHandle.mailme();
    }//GEN-LAST:event_lblEmailMouseClicked

    private void lblEmailMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblEmailMouseEntered
        lblEmail.setForeground(Color.BLUE);
    }//GEN-LAST:event_lblEmailMouseEntered

    private void lblEmailMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblEmailMouseExited
        lblEmail.setForeground(Color.BLACK);
    }//GEN-LAST:event_lblEmailMouseExited

    private void btnCompareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCompareActionPerformed
        arrRndLess = new int[4];
        arrRndGreater = new int[4];
        arrRndAvg = new int[4];


        for (int i = 0; i < genCycle; i++) {
            for (int j = 0; j < 4; j++) {
                arrRndAvg[j] += arrRndGen[i][j];
                if (arrRndGen[i][j] <= degree[j]) {
                    arrRndLess[j]++;
                }
                if (arrRndGen[i][j] >= degree[j]) {
                    arrRndGreater[j]++;
                }
            }
        }

        txtLess0.setText(Float.toString((float) arrRndLess[0] / genCycle));
        txtGreater0.setText(Float.toString((float) arrRndGreater[0] / genCycle));
        txtLess1.setText(Float.toString((float) arrRndLess[1] / genCycle));
        txtGreater1.setText(Float.toString((float) arrRndGreater[1] / genCycle));
        txtLess2.setText(Float.toString((float) arrRndLess[2] / genCycle));
        txtGreater2.setText(Float.toString((float) arrRndGreater[2] / genCycle));
        txtLess3.setText(Float.toString((float) arrRndLess[3] / genCycle));
        txtGreater3.setText(Float.toString((float) arrRndGreater[3] / genCycle));

        txtAvg0.setText(Float.toString((float) arrRndAvg[0] / genCycle));
        txtAvg1.setText(Float.toString((float) arrRndAvg[1] / genCycle));
        txtAvg2.setText(Float.toString((float) arrRndAvg[2] / genCycle));
        txtAvg3.setText(Float.toString((float) arrRndAvg[3] / genCycle));

    }//GEN-LAST:event_btnCompareActionPerformed

    private void rdoDiv5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoDiv5ActionPerformed
        div = 5;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoDiv5ActionPerformed

    private void rdoDiv6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoDiv6ActionPerformed
        div = 6;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoDiv6ActionPerformed

    private void rdoDiv7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoDiv7ActionPerformed
        div = 7;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoDiv7ActionPerformed

    private void rdoDiv8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoDiv8ActionPerformed
        div = 8;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoDiv8ActionPerformed

    private void rdoDivAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoDivAllActionPerformed
        div = 0;
        btnGenRnd.setEnabled(false);
        btnCompare.setEnabled(false);
    }//GEN-LAST:event_rdoDivAllActionPerformed

    public void init() {
        if (divMixed) {
            rdoDivAll.setEnabled(true);
            rdoDiv5.setEnabled(false);
            rdoDiv6.setEnabled(false);
            rdoDiv7.setEnabled(false);
            rdoDiv8.setEnabled(false);
        } else {
            rdoDivAll.setEnabled(false);
            rdoDiv5.setEnabled(true);
            rdoDiv6.setEnabled(true);
            rdoDiv7.setEnabled(true);
            rdoDiv8.setEnabled(true);
            rdoDiv5.setSelected(true);
        }
    }

    private void performQuery(String file) {
        degree = LegacyDB.degreeQuery(file, boolGlu, boolInput, div);
        totalConn = degree[1] + degree[2] * 2 + degree[3] * 3;
        txt1Deg.setText(Integer.toString(degree[1]));
        txt2Deg.setText(Integer.toString(degree[2]));
        txt3Deg.setText(Integer.toString(degree[3]));
        txtTotalConn.setText(Integer.toString(totalConn));
    }

    private void countSlot(String file) {
        QryResult result = LegacyDB.nSlotQuery(file, boolGlu, div);
        currTypeInGrp = result.getCurrTypeInGrp();
        groupSize = result.getGroupSize();
        nCurrTypeCell = result.getCurrTypeCell();
        nBothTypeCell = result.getBothTypeCell();

        if (boolInput) {
            txtTotalCell.setText(Integer.toString(nBothTypeCell));
            degree[0] = nBothTypeCell - degree[1] - degree[2] - degree[3];
            txt0Deg.setText(Integer.toString(degree[0]));
        } else {
            txtTotalCell.setText(Integer.toString(nCurrTypeCell));
            degree[0] = nCurrTypeCell - degree[1] - degree[2] - degree[3];
            txt0Deg.setText(Integer.toString(degree[0]));
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */

        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(IoDistanceUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(IoDistanceUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(IoDistanceUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(IoDistanceUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new IoDistanceUI().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup DIVGroup;
    private javax.swing.JFileChooser DataFileChooser;
    private javax.swing.JButton btnCompare;
    private javax.swing.JButton btnGenRnd;
    private javax.swing.JButton btnQuery;
    private javax.swing.JButton btnSaveRnd;
    private javax.swing.ButtonGroup gluGABAGroup;
    private javax.swing.ButtonGroup inOutGroup;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel lblDoQuery;
    private javax.swing.JLabel lblEmail;
    private javax.swing.JLabel lblQueryOption;
    private javax.swing.JRadioButton rdoDiv5;
    private javax.swing.JRadioButton rdoDiv6;
    private javax.swing.JRadioButton rdoDiv7;
    private javax.swing.JRadioButton rdoDiv8;
    private javax.swing.JRadioButton rdoDivAll;
    private javax.swing.JRadioButton rdoInput;
    private javax.swing.JRadioButton rdoOutput;
    private javax.swing.JTextField txt0Deg;
    private javax.swing.JTextField txt1Deg;
    private javax.swing.JTextField txt2Deg;
    private javax.swing.JTextField txt3Deg;
    private javax.swing.JTextField txtAvg0;
    private javax.swing.JTextField txtAvg1;
    private javax.swing.JTextField txtAvg2;
    private javax.swing.JTextField txtAvg3;
    private javax.swing.JTextField txtCycles;
    private javax.swing.JTextField txtGreater0;
    private javax.swing.JTextField txtGreater1;
    private javax.swing.JTextField txtGreater2;
    private javax.swing.JTextField txtGreater3;
    private javax.swing.JTextField txtLess0;
    private javax.swing.JTextField txtLess1;
    private javax.swing.JTextField txtLess2;
    private javax.swing.JTextField txtLess3;
    private javax.swing.JTextField txtTotalCell;
    private javax.swing.JTextField txtTotalConn;
    // End of variables declaration//GEN-END:variables
    int[] degree = new int[4];
    int nCurrTypeCell = 0;
    int nBothTypeCell = 0;
    String pathToFile;
    boolean boolGlu = true;
    boolean boolInput = true;
    int totalConn = 0;
    int genCycle;
    ArrayList<Integer> currTypeInGrp = new ArrayList<>(100);
    ArrayList<Integer> groupSize = new ArrayList<>(100);
    int[][] arrRndGen;
    int[] arrRndLess;
    int[] arrRndGreater;
    int[] arrRndAvg;
    int div = 0;
    MyFit[] fits;
    boolean divMixed;
    GenRanDist gen;

    public void setPathToFile(String pathToFile) {
        this.pathToFile = pathToFile;
    }

    public void setBoolGlu(boolean boolGlu) {
        this.boolGlu = boolGlu;
    }

    public void setDivMixed(boolean divMixed) {
        this.divMixed = divMixed;
    }

    public void setGen(GenRanDist gen) {
        this.gen = gen;
    }
    
}
